JollyMask
02/25/2025, 12:02 PMfirstMessageMode
set to assistant-speaks-first
?
2. Or with assistant-waits-for-user
mode, if the user does not respond within a certain number of seconds, the assistant starts speaking automatically?
https://cdn.discordapp.com/attachments/1343915991670853654/1343915991821975663/image.png?ex=67bf02cd&is=67bdb14d&hm=20b0ba58145e394f0aa0df0072e502d8c888b2b87d006689c46ca4872666416d&JollyMask
02/25/2025, 4:55 PMShubham Bajaj
02/26/2025, 3:55 PMThis is documented as:
* This is how long assistant waits before speaking. Defaults to 0.4.
*
* This is the minimum it will wait but if there is latency is the pipeline, this minimum will be exceeded. This is intended as a stopgap in case the pipeline is moving too fast.
*
* Example:
* - If model generates tokens and voice generates bytes within 100ms, the pipeline still waits 300ms before outputting speech.
*
* Usage:
* - If the customer is taking long pauses, set this to a higher value.
* - If the assistant is accidentally jumping in too much, set this to a higher value.
*
* @default 0.4
*/
2. For assistant-waits-for-user mode with auto-speak timeout:
You can use the silenceTimeoutSeconds and messagePlan.silenceTimeoutMessage configuration:
const assistant: CreateAssistantDTO = {
firstMessageMode: 'assistant-waits-for-user',
silenceTimeoutSeconds: 15, // Will timeout after 15 seconds of silence
messagePlan: {
silenceTimeoutMessage: "Hello! I noticed you haven't said anything. How can I help you today?"
}
// ... other configurations
};
This is documented as:
* How many seconds of silence to wait before ending the call. Defaults to 30.
*
* @default 30
*/
@IsOptional()
@IsNumberWithHelpfulError()
@Max(3600)
@Min(10)
@ApiPropertyOptional({ example: 30 })
silenceTimeoutSeconds?: number;
**
Why this is the right solution:**
1. startSpeakingPlan.waitSeconds is specifically designed for controlling speech timing
2. silenceTimeoutSeconds with silenceTimeoutMessage provides a graceful fallback for when users don't respond
Let me know if you need any clarification or have additional questions!JollyMask
03/20/2025, 11:28 AMAniah
03/22/2025, 4:09 AMbroux
03/24/2025, 7:09 PMJollyMask
03/26/2025, 11:07 AMAniah
03/26/2025, 10:14 PM